package au.edu.uq.itee.engg2800.team19;

import java.io.IOException;


public class DataReadWrite {
	private RS232Conn myConn;
	private FrequenciesReceived freqs;
	//private int readCount=1;

	public DataReadWrite(RS232Conn connection){
		this.myConn=connection;
	}

	public void createWriter(){
		try {
			DataSender.setWriterStream(myConn.getSerialPort().getOutputStream());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public void createReader(){
		try {
			 new DataReceiver(myConn.getSerialPort().getInputStream(),freqs).start();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}



}
